<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/5/29
 * Time: 18:52
 */
namespace app\api\controller;


use app\common\model\QuotationCoin;
use think\Db;

/**
 * 行情控制器
 */
class Quotation extends ApiBase
{

    //推荐币种
    public function recommended_currencies(){
        return $this->apiReturn($this->logicQuotation->recommended_currencies($this->param));
    }


    //添加关注币种

    public function follow_coin(){
        return $this->apiReturn($this->logicQuotation->follow_coin($this->param));
    }


    //修改币种排序

    public function sort_coin(){
        return $this->apiReturn($this->logicQuotation->sort_coin($this->param));
    }



    //热门搜索

    public function hot_search(){
        $list=QuotationCoin::where(['status'=>1,'is_hot'=>1])->limit(10)->order('id asc')->column('coin_a');
        return $this->apiReturn($list);
    }



    //关注取消关注平台

    public function follow_platform(){
        return $this->apiReturn($this->logicQuotation->follow_platform($this->param));
    }


    //排序关注平台

    public function sort_platform(){
        return $this->apiReturn($this->logicQuotation->sort_platform($this->param));
    }


}
